/**   
* @Title: Product.java 
* @Package com.csis.system.domain 
* @Description: TODO
* @author dailey  
* @date 2012-10-6
* @version V1.0   
*/
package com.csis.system.domain;

import static com.csis.system.common.IStaticData.COLUMN_PRODUCT_CATEGORYID;
import static com.csis.system.common.IStaticData.COLUMN_PRODUCT_PRODUCTCOLOR;
import static com.csis.system.common.IStaticData.COLUMN_PRODUCT_PRODUCTFACTORY;
import static com.csis.system.common.IStaticData.COLUMN_PRODUCT_PRODUCTID;
import static com.csis.system.common.IStaticData.COLUMN_PRODUCT_PRODUCTIMAGE;
import static com.csis.system.common.IStaticData.COLUMN_PRODUCT_PRODUCTNAME;
import static com.csis.system.common.IStaticData.COLUMN_PRODUCT_PRODUCTNOTE;
import static com.csis.system.common.IStaticData.COLUMN_PRODUCT_PRODUCTPRICE1;
import static com.csis.system.common.IStaticData.COLUMN_PRODUCT_PRODUCTPRICE2;
import static com.csis.system.common.IStaticData.COLUMN_PRODUCT_PRODUCTPRICE3;
import static com.csis.system.common.IStaticData.COLUMN_PRODUCT_PRODUCTPRICEUNIT;
import static com.csis.system.common.IStaticData.COLUMN_PRODUCT_PRODUCTSIZE;
import static com.csis.system.common.IStaticData.COLUMN_PRODUCT_PRODUCTUPDATE;
import static com.csis.system.common.IStaticData.TABLE_PRODUCT;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.Type;

/**
 * @author dailey
 *
 */
@Entity
@Table(name = TABLE_PRODUCT)
public class Product {
	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	@Column(name = COLUMN_PRODUCT_PRODUCTID)
	private java.lang.Integer id = null;

	//	@Column(name = COLUMN_PRODUCT_CATEGORYID)
	//	private java.lang.Integer categoryId = null;
	@Column(name = COLUMN_PRODUCT_PRODUCTNAME)
	private java.lang.String productName = null;
	@Column(name = COLUMN_PRODUCT_PRODUCTCOLOR)
	private java.lang.String productColor = null;
	@Column(name = COLUMN_PRODUCT_PRODUCTSIZE)
	private java.lang.String productSize = null;
	@Column(name = COLUMN_PRODUCT_PRODUCTPRICE1)
	private java.lang.Float productPrice1 = null;
	@Column(name = COLUMN_PRODUCT_PRODUCTPRICE2)
	private java.lang.Float productPrice2 = null;
	@Column(name = COLUMN_PRODUCT_PRODUCTPRICE3)
	private java.lang.Float productPrice3 = null;
	@Column(name = COLUMN_PRODUCT_PRODUCTPRICEUNIT)
	private java.lang.String productPriceUnit = null;
	@Column(name = COLUMN_PRODUCT_PRODUCTFACTORY)
	private java.lang.String productFactory = null;
	@Column(name = COLUMN_PRODUCT_PRODUCTUPDATE)
	private java.util.Date productUpdate = null;
	@Column(name = COLUMN_PRODUCT_PRODUCTIMAGE)
	@Type(type="binary")
	private byte[] productImage = null;
	@Column(name = COLUMN_PRODUCT_PRODUCTNOTE)
	private java.lang.String productNote = null;

	@ManyToOne
	@JoinColumn(name = COLUMN_PRODUCT_CATEGORYID, nullable = false, updatable = true, insertable = true)
	private Category category;

	/**
	 * @return the category
	 */
	public Category getCategory() {
		return category;
	}

	/**
	 * @param category the category to set
	 */
	public void setCategory(Category category) {
		this.category = category;
	}

	public java.lang.Integer getId() {
		return id;
	}

	public void setId(java.lang.Integer productId) {
		this.id = productId;
	}

	public java.lang.String getProductName() {
		return productName;
	}

	public void setProductName(java.lang.String productName) {
		this.productName = productName;
	}

	public java.lang.String getProductColor() {
		return productColor;
	}

	public void setProductColor(java.lang.String productColor) {
		this.productColor = productColor;
	}

	public java.lang.String getProductSize() {
		return productSize;
	}

	public void setProductSize(java.lang.String productSize) {
		this.productSize = productSize;
	}

	public java.lang.Float getProductPrice1() {
		return productPrice1;
	}

	public void setProductPrice1(java.lang.Float productPrice1) {
		this.productPrice1 = productPrice1;
	}

	public java.lang.Float getProductPrice2() {
		return productPrice2;
	}

	public void setProductPrice2(java.lang.Float productPrice2) {
		this.productPrice2 = productPrice2;
	}

	public java.lang.Float getProductPrice3() {
		return productPrice3;
	}

	public void setProductPrice3(java.lang.Float productPrice3) {
		this.productPrice3 = productPrice3;
	}

	public java.lang.String getProductPriceUnit() {
		return productPriceUnit;
	}

	public void setProductPriceUnit(java.lang.String productPriceUnit) {
		this.productPriceUnit = productPriceUnit;
	}

	public java.lang.String getProductFactory() {
		return productFactory;
	}

	public void setProductFactory(java.lang.String productFactory) {
		this.productFactory = productFactory;
	}

	public java.util.Date getProductUpdate() {
		return productUpdate;
	}

	public void setProductUpdate(java.util.Date productUpdate) {
		this.productUpdate = productUpdate;
	}

	public byte[] getProductImage() {
		return productImage;
	}

	public void setProductImage(byte[] productImage) {
		this.productImage = productImage;
	}

	public java.lang.String getProductNote() {
		return productNote;
	}

	public void setProductNote(java.lang.String productNote) {
		this.productNote = productNote;
	}

}